<template>
  <div class="app">
    <h1>{{ counter }}</h1>
    <my-info @btnAdd="increase"></my-info>
  </div>
</template>

<script>
import MyInfo from './MyInfo.vue';
export default {
  components: { MyInfo },
    data: function() {
        return {
            counter: 0
        }
    },
    methods: {
        increase(num) {
            this.counter += num
        }
    }
}
</script>

<style>

</style>